<?php
require_once '3shujuku.php';
header("content-type:text/html;charset=utf-8");

$name = $_POST['name'];
$password = $_POST['password'];
$name = mysql_real_escape_string($name);    
$password = mysql_real_escape_string($password);
$password = md5($password);

$sql = "select * from renwu
where name = '$name' and password = '$password' limit 1;";

//echo $sql;
//die;           //   调试方法

$result = $conn->query($sql);
if($result->num_rows>0){
    echo "登入成功";
}
else {
    echo "登入失败";
}

